package com.example.swichbut;
import android.net.Uri;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity {

	private Button button;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		button=(Button) findViewById(R.id.button1);
		button.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Uri uri=Uri.parse("http://hao.360.cn/?src=bm");
		Intent intent= new Intent(Intent.ACTION_VIEW,uri);
		startActivity(intent);
			}
		});
//		Xlick();
	}
//	public void Xlick()
//	{
//		Uri uri=Uri.parse("https://www.starbucks.com.cn/cn/coffeehouse/culture");
//		Intent intent= new Intent(Intent.ACTION_VIEW,uri);
//		startActivity(intent);
//	}
}
